home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / CIncludes / assert.h < prev    next >
Encoding:
Text File  |  1995-08-05  |  743 b   |  41 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     Assert.h
  4.     Diagnostics
  5.     
  6.     Copyright © Apple Computer,Inc.  1987-1990, 1994,1995.
  7.     All Rights Reserved.
  8.  
  9. ************************************************************/
  10.  
  11. #undef assert
  12.  
  13. #ifdef NDEBUG
  14.  
  15.     #define assert(ignore) ((void) 0)
  16.  
  17. #else
  18.  
  19.     #if defined (__CFM68K__) && !defined (UsingStaticLibs)
  20.         #pragma import on
  21.     #endif
  22.     
  23.     #ifdef __cplusplus
  24.         extern "C" {
  25.     #endif
  26.  
  27.     void __assertprint(const char* file, int line, const char* expr);
  28.  
  29.     #ifdef __cplusplus
  30.         }
  31.     #endif
  32.     
  33.     #define assert(expression) \
  34.         ( (expression) ? (void) 0 : (__assertprint(__FILE__, __LINE__, #expression)) )
  35.  
  36.     #if defined (__CFM68K__) && !defined (UsingStaticLibs)
  37.         #pragma import off
  38.     #endif
  39.             
  40. #endif
  41.